package com.zucc.app.mappers;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;
import com.zucc.app.domains.User;

/**
 * Created by hegy on 2018/4/13.
 */
@Mapper
@Component("userMapper")
public interface UserMapper {

    @Insert("INSERT INTO user_info(userName,password,sex) VALUES(#{userName}, #{password},#{sex})")
    int insert(@Param("userName") String userName, @Param("password") String password,@Param("sex") Integer sex);
    
    @Select("select * from user_info where userName = #{userName} and password = #{password} limit 1")
    User select(@Param("userName") String userName ,@Param("password") String password);
    
}
